#ifndef ROGUE_H
#define ROGUE_H

#include <ncurses.h>
#include <stdlib.h>

typedef struct {
    int y;
    int x;
} Position;

typedef struct {
    char ch;
    bool walkable;
} Tile;

typedef struct {
    Position pos;
    char ch;
} Entity;

// drawing functions
void draw_map(void);
void draw_entity(Entity* entity);
void draw(void);

// engine functions
void curses_setup(void), game_loop(void), close_game(void);

// map functions
Tile** create_map(void);
Position setup_map(void);
void free_map(void);

// player functions
Entity* create_player(Position start_pos);
void handle_input(int input);
void move_player(Position new_pos);

// externs
extern const int MAP_HEIGHT;
extern const int MAP_WIDTH;
extern Entity* player;
extern Tile** map;

#endif //ROGUE_H
